package com.qut.graduate.busrtquery.greendao.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.qut.graduate.busrtquery.greendao.bean.BusLine;
import com.qut.graduate.busrtquery.greendao.bean.BusLineCollect;
import com.qut.graduate.busrtquery.greendao.bean.StationInfo;
import com.qut.graduate.busrtquery.greendao.bean.StationInfoCollect;

import com.qut.graduate.busrtquery.greendao.dao.BusLineDao;
import com.qut.graduate.busrtquery.greendao.dao.BusLineCollectDao;
import com.qut.graduate.busrtquery.greendao.dao.StationInfoDao;
import com.qut.graduate.busrtquery.greendao.dao.StationInfoCollectDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig busLineDaoConfig;
    private final DaoConfig busLineCollectDaoConfig;
    private final DaoConfig stationInfoDaoConfig;
    private final DaoConfig stationInfoCollectDaoConfig;

    private final BusLineDao busLineDao;
    private final BusLineCollectDao busLineCollectDao;
    private final StationInfoDao stationInfoDao;
    private final StationInfoCollectDao stationInfoCollectDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        busLineDaoConfig = daoConfigMap.get(BusLineDao.class).clone();
        busLineDaoConfig.initIdentityScope(type);

        busLineCollectDaoConfig = daoConfigMap.get(BusLineCollectDao.class).clone();
        busLineCollectDaoConfig.initIdentityScope(type);

        stationInfoDaoConfig = daoConfigMap.get(StationInfoDao.class).clone();
        stationInfoDaoConfig.initIdentityScope(type);

        stationInfoCollectDaoConfig = daoConfigMap.get(StationInfoCollectDao.class).clone();
        stationInfoCollectDaoConfig.initIdentityScope(type);

        busLineDao = new BusLineDao(busLineDaoConfig, this);
        busLineCollectDao = new BusLineCollectDao(busLineCollectDaoConfig, this);
        stationInfoDao = new StationInfoDao(stationInfoDaoConfig, this);
        stationInfoCollectDao = new StationInfoCollectDao(stationInfoCollectDaoConfig, this);

        registerDao(BusLine.class, busLineDao);
        registerDao(BusLineCollect.class, busLineCollectDao);
        registerDao(StationInfo.class, stationInfoDao);
        registerDao(StationInfoCollect.class, stationInfoCollectDao);
    }
    
    public void clear() {
        busLineDaoConfig.clearIdentityScope();
        busLineCollectDaoConfig.clearIdentityScope();
        stationInfoDaoConfig.clearIdentityScope();
        stationInfoCollectDaoConfig.clearIdentityScope();
    }

    public BusLineDao getBusLineDao() {
        return busLineDao;
    }

    public BusLineCollectDao getBusLineCollectDao() {
        return busLineCollectDao;
    }

    public StationInfoDao getStationInfoDao() {
        return stationInfoDao;
    }

    public StationInfoCollectDao getStationInfoCollectDao() {
        return stationInfoCollectDao;
    }

}
